import { forBindEventThis } from '../../../../../../../../../../../global/direct/Func';
import { high_light_dom } from '../../../../../../../../../../../global/element/high_light_dom';
import { tag_title_dataMana } from './cla_tag_title_dataMana';

const tag_title_operateTag = 'tag_title_operate';

class tag_title_operate extends tag_title_dataMana {
  get [Symbol.toStringTag]() {
    return tag_title_operateTag;
  }

  constructor(props) {
    super(props);

    forBindEventThis(this);

    this.eventM.addEventListen(
      this.dom_title_writable_area,
      'blur',
      this.eventBind.text_area_on_blur
    );
  }

  /**
   * 编辑元素 失焦 时 保存 当前值 并 高亮提示
   * @param {MouseEvent} event
   */
  text_area_on_blur(event) {
    console.log(event.currentTarget, '元素 失焦');

    high_light_dom(this.dom_title_writable_area);

    this.sign_key_val();
  }
}

export { tag_title_operate };
